<!DOCTYPE html>
<html lang="zh-cn">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<title>用户登录 - {$maccms.site_name}</title>
	<meta name="keywords" content="{$maccms.site_keywords}" />
	<meta name="description" content="{$maccms.site_description}" />
	{include file="public/include"}
	<link href="/template/mxone/mxstatic/css/mxone.css" rel="stylesheet" type="text/css">
	<style>
		.checkboxinput {
			-webkit-appearance: checkbox;
		}

		.nonemore {
			background: none;
		}

		[class^=icon-],
		[class*=" icon-"] {
			line-height: inherit !important;
		}

		button.btn-face {
			border-radius: 50%;
			width: 60px;
			height: 60px;
			font-size: 12px;
			background: #a9a9a936;
		}
	</style>
</head>

<body class="page">
	{include file="public/header"}
	<div class="mxone_login__form clearfix">
		<div class="mxone-pannel mxone-pannel-bg clearfix">
			<div class="mxone-pannel-box clearfix">
				<div class="mxone-pannel_bd">
					<div class="head">

						<h4 class="margin-0">登录账号</h4>
					</div>
					<ul class="input-list">
						<form method="post" id="fm" action="">
							<li>
								<input type="text" id="user_name" name="user_name" class="form-control"
									placeholder="请输入您的登录账号">
							</li>
							<li>
								<input type="password" id="user_pwd" name="user_pwd" class="form-control"
									placeholder="请输入您的登录密码">
							</li>

							<li>
								<button type="button" id="btn_submit"
									class="btn btn-lg btn-block btn-primary">立即登录</button>
							</li>
							<li class="text-center">
								<a href="/">返回首页</a><span class="split-line"></span><a
									href="/index.php/user/reg.html">注册账号</a><span class="split-line"></span><a
									href="/index.php/user/findpass.html">找回密码</a>
							</li>
						</form>
					</ul>
					<div class="another top-line">
						<p class="text-muted">第三方快捷登录</p>
					</div>
				</div>
			</div>
		</div>
	</div>
	{include file="public/foot"}
	<!-- // sign-box#regbox end -->
	<script type="text/javascript">

		$(function () {
			$("body").bind('keyup', function (event) {
				if (event.keyCode == 13) { $('#btn_submit').click(); }
			});
			$('#btn_submit').click(function () {
				if ($('#user_name').val() == '') { layer.msg('请输入用户！'); $("#user_name").focus(); return false; }
				if ($('#user_pwd').val() == '') { layer.msg('请输入密码！'); $("#user_pwd").focus(); return false; }
				if ($('#verify').length > 0 && $('#verify').val() == '') { layer.msg('请输入验证码！'); $("#verify").focus(); return false; }

				$.ajax({
					url: "/index.php/user/login.html",
					type: "post",
					dataType: "json",
					data: $('#fm').serialize(),
					beforeSend: function () {
						$("#btn_submit").css("background", "#fd6a6a").val("loading...");
					},
					success: function (r) {
						if (r.code == 1) {
							location.href = "/index.php/user/index.html";
						}
						else {
							layer.msg(r.msg);
							$('#verify_img').click();
						}
					},
					complete: function () {
						$("#btn_submit").css("background", "#fa4646").val("立即登录");
					}
				});

			});
		});

	</script>

</body>

</html>